//1.使用scanf()读取用户输入的里程和汽油量
//2.计算消耗每加仑汽油量行驶的英里数，并打印结果
//3.使用#define或const创建两个转换系数，将单位是英里/加仑的值转换为升/100公里
//4.US采用单位燃料/行程，EU采用单位距离/燃料

#include <stdio.h>

#define MILE_TO_KM 1.609
#define GOLLON_TO_LITER 3.785

int main(void)
{
    float mile, gallon, mile_gallon, liter_km;

    printf("Please enter your mileage and fuel consumption in gallons: ");
    scanf("%f %f", &mile,  &gallon);

    mile_gallon = mile / gallon;
    printf("In USA, your miles per gallon (MPG) is: %.1f\n", mile_gallon);

    liter_km = (gallon * GOLLON_TO_LITER) / (mile * MILE_TO_KM);
    printf("In EU,that's also equal %.1f to liters per 100 kilometers.", liter_km);
    
    return 0;
}